package top.z.orm.core.osql;

/**
 * 对象到SQL的转换(对应SuidRich)
 */
public interface ObjToSQLRich extends ObjToSQL {

    <T> String toSelectSQL(T entity, int size);

    <T> String toSelectSQL(T entity, int start, int size);

    <T> String toSelectSQL(T entity, String fields) throws ObjSQLException;

    <T> String toSelectSQL(T entity, String selectFields, int start, int size);

    <T> String toUpdateSQL(T entity, String updateFields);

    <T> String toUpdateSQL(T entity, String updateFields, IncludeType includeType);

    <T> String toSelectFunSQL(T entity, FunctionType functionType, String FieldForFun, Condition condition);

    <T> String toSelectOrderBySQL(T entity, String orderFields) throws ObjSQLException;

    <T> String toSelectOrderBySQL(T entity, String orderFields, OrderType[] orderTypes) throws ObjSQLException;

    <T> String toSelectSQL(T entity, IncludeType includeType);

    <T> String toDeleteSQL(T entity, IncludeType includeType);

    <T> String toInsertSQL(T entity, IncludeType includeType);

    <T> String toUpdateSQL(T entity, IncludeType includeType);

    <T> String[] toInsertSQL(T[] entity);

    <T> String[] toInsertSQL(T[] entity, int batchSize);

    <T> String[] toInsertSQL(T[] entity, String excludeFields);

    <T> String[] toInsertSQL(T[] entity, int batchSize, String excludeFields);

    String toDeleteByIdSQL(Class<?> clazz, Integer id);

    String toDeleteByIdSQL(Class<?> c, Long id);

    String toDeleteByIdSQL(Class<?> clazz, String ids);

    <T> String toSelectByIdSQL(T entity, Integer id);

    <T> String toSelectByIdSQL(T entity, Long id);

    <T> String toSelectByIdSQL(T entity, String ids);

    <T> String toSelectSQL(T entity, IncludeType includeType, Condition condition);

    <T> String toUpdateBySQL(T entity, String whereFields);

    <T> String toUpdateBySQL(T entity, String whereFields, IncludeType includeType);

    <T> String toUpdateBySQL(T entity, String whereFields, Condition condition);

    <T> String toUpdateSQL(T entity, String updateFields, Condition condition);

}